package br.ucb.bsiLab2.controler;

import br.ucb.bsiLab2.dominio.FourSquareFactory;
import fi.foyt.foursquare.api.FoursquareApi;
import fi.foyt.foursquare.api.FoursquareApiException;
import fi.foyt.foursquare.api.Result;
import fi.foyt.foursquare.api.entities.CompactVenue;
import fi.foyt.foursquare.api.entities.VenuesSearchResult;

public class TesteConexao {
	
	FoursquareApi foursquare = FourSquareFactory.giveMeOne();
	
	public void buscaTeste() throws FoursquareApiException{
//		Result<VenuesSearchResult> listVenues = foursquare.venuesSearch("Salvador BA", "catedral", new Integer(20), null, null, null, null, null);
//		for(CompactVenue venue : listVenues.getResult().getVenues()){
//			Result<CompleteVenue> rComplete = foursquare.venue(venue.getId());
//			CompleteVenue cVenue = rComplete.getResult();
//			System.out.println(cVenue.getName());
//			System.out.println(cVenue.getDescription());
//			System.out.println(cVenue.getLocation().getDistance());
//			System.out.println(venue.getName());
			
//		}
	}
	
	public static void main(String[] args) {
		TesteConexao t = new TesteConexao();
		try {
			t.buscaTeste();
		} catch (FoursquareApiException e) {
			e.printStackTrace();
		}
	}

}
